<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="../../lib/bootstrap-3.4.1-dist/css/bootstrap.css">
    <link rel="stylesheet" href="../../iconfont/iconfont.css">
    <link rel="stylesheet" href="../../css/nav.css">
    <link rel="stylesheet" href="../../iconfont/font/iconfont.css">
    <link rel="stylesheet" href="../../css/header_nav.css">
    <link rel="stylesheet" href="../../css/xitongshouye/shouye.css">
    <script src="../../lib/jquery/jquery-3.6.0.js"></script>
    <script src="../../lib/bootstrap-3.4.1-dist/js/bootstrap.js"></script>
    <script src="../../js/xitongshouye/xitongshouye.js"></script>
</head>

<body onLoad="showday()">
    <div class="modal fade" tabindex="-1" role="dialog">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title">确认提示</h4>
                </div>
                <div class="modal-body">
                    <p>退出系统确认</p>
                    <p>确认要退出登录吗?</p>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                    <button type="button" class="btn btn-primary outlogin">确定</button>
                </div>
            </div>
        </div>
    </div>
    <header class="clearfix">
        <div class="row">
            <div class="col-md-7 col-xs-7">
                <img src="../../iconfont-img/yuan.png" alt="">
                <h4>教师人力资源管理系统</h4>
            </div>
            <div class="col-md-5 col-xs-5">
                <div class="row">
                    <div class="col-md-4 col-xs-4">
                        <div id="search_name">
                            <input type="text" placeholder="请输入员工姓名"><span class="iconfont icon-search2"></span>
                        </div>

                    </div>
                    <div class="col-md-6 col-xs-6">
                        <div class="row">
                            <div class="col-md-3 col-xs-3">
                                <div>
                                    <span class="iconfont icon-table_fill"></span>事项
                                    <div id="matter_div">
                                        <div>待办事项</div>
                                        <div class="row">
                                            <div class="col-md-6 col-xs-6">
                                                ●今日待审批请假申请（<span class="matter_num">0</span>）
                                            </div>
                                            <div class="col-md-6 col-xs-6">
                                                ●今日待审批加班申请（<span class="matter_num">0</span>）
                                            </div>
                                            <div class="col-md-6 col-xs-6">
                                                ●待处理的劳动合同续签（<span class="matter_num">0</span>）
                                            </div>
                                            <div class="col-md-6 col-xs-6">
                                                ●今日审批的出差申请（<span class="matter_num">0</span>）
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="col-md-3 col-xs-3">
                                <a href="../sider_nav/date.html"><span class="iconfont icon-kaoqin"></span>日历</a>
                            </div>
                            <div class="col-md-3 col-xs-3">
                                <a href=""><span class="iconfont icon-kaoqin"></span>消息</a>
                            </div>
                            <div class="col-md-3 col-xs-3">
                                <a href="../sider_nav/lock.html"><span class="iconfont icon-kaoqin"></span>锁屏</a>
                            </div>
                        </div>
                    </div>
                    <div class="col-md-2 col-xs-2" id="user_div">
                        <div>
                            <span class="iconfont icon-ren"></span><span class="username"></span><span class="iconfont icon-shanglajiantou"></span>
                            <div id="pull_down">
                                <div><a href="../sider_nav/changemsg.html">修改资料</a></div>
                                <div><a href="../sider_nav/changeimg.html">修改头像</a></div>
                                <div><a href="../sider_nav/changepwd.html">修改密码</a></div>
                                <div class="logout"><a href="../sider_nav/login.html">退出登录</a></div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </header>
    <div class="row" id="main">
        <nav id="nav_left" class="col-md-2 col-xs-2">
            <ul>
                <li><a href="../xitongshouye--shikaiwen/shouye.html"><span class="iconfont icon-jurassic_home"></span>系统首页</a></li>
                <li><a href="../zuZhiGuanLi--wangHeng/zuZhiGuanLiDaoHang.html"><span class="iconfont icon-daifenpei"></span>组织管理</a></li>
                <li><a href="../zhaoPinGuanLi--songJiaYu/zhaoPinGuanLiShouYe.html"><span class="iconfont icon-ren"></span>招聘管理</a></li>
                <li><a href="../renshiguanli/renshiguanlidaohang.html"><span class="iconfont icon-sangeren"></span>人事管理</a></li>
                <li><a href="../kaoQinGuanLi--JiangPeng/kaoQinGuanLi.html"><span class="iconfont icon-kaoqin"></span>考勤管理</a></li>
                <li><a href="../xinchouFuLi--Heyinhua/xinchouFuLishouye.html"><span class="iconfont icon-shipin-sige"></span>薪酬福利</a></li>
                <li><a href="../../pages/xitongshouye--shikaiwen/gonggao.html"><span class="iconfont icon-laba"></span>通知公告</a></li>
                <li><a href="../XiTongGuanLi/XiTong.html"><span class="iconfont icon-shezhi"></span>系统管理</a></li>
            </ul>
        </nav>
        <div class="content_nav col-md-10 col-xs-10">
            <!-- 这个是内容上面带房子的导航栏 -->
            <div class="pull-left">
                <a href=""><span class="iconfont icon-jurassic_home"></span></a>
                <span class="iconfont icon-youjiantou"></span>一级分类
                <span class="iconfont icon-youjiantou"></span>系统首页
            </div>
            <div class="pull-right">
                <a href=""><span class="iconfont icon-zuojiantou"></span></a>
                <a href=""><span class="iconfont icon-zhongzhi"></span></a>
            </div>
        </div>
        <div class="col-md-10 col-xs-10" id="content">
            <!-- 这里面装的内容 -->
            <div class="container xx">
                <div class="row">
                    <p>快速新建</p>
                    <div class="col-md-1">
                        <img src="../../iconfont-img/renyuan.png" alt="">
                        <p>个人信息</p>
                    </div>
                    <div class="col-md-1">
                        <img src="../../iconfont-img/dengpao.png" alt="">
                        <p>我的考勤</p>
                    </div>
                    <div class="col-md-1">
                        <img src="../../iconfont-img/jinqian.png" alt="">
                        <p>我的薪酬</p>
                    </div>
                    <div class="col-md-1">
                        <img src="../../iconfont-img/ziyuan38.png" alt="">
                        <p>我的工作</p>
                    </div>
                    <div class="col-md-1">
                        <img src="../../iconfont-img/lianxiren.png" alt="">
                        <p>企业联系人</p>
                    </div>
                    <div class="col-md-1">
                        <img src="../../iconfont-img/qianbi.png" alt="">
                        <p>工作报告</p>
                    </div>
                    <div class="col-md-1">
                        <img src="../../iconfont-img/renwu.png" alt="">
                        <p>我的任务</p>
                    </div>

                </div>

            </div>
            <div class="container xx1">
                <div class="row clear">
                    <div class="col">
                        <p>数据简报
                            <span>
                <select name="" id="select">
                  <option value="0">xx学校</option>
                  <option value="0">xx学校</option>
                  <option value="0">xx学校</option>
                </select>
              </span>
                        </p>
                        <div class="col-md-3">
                            <p>当月入职员工</p>
                            <p>200</p>
                        </div>
                        <div class="col-md-3">
                            <p>当月离职员工</p>
                            <p>200</p>
                        </div>
                        <div class="col-md-3">
                            <p>当月在职员工</p>
                            <p>200</p>
                        </div>
                        <div class="col-md-3">
                            <p>当月实习生</p>
                            <p>200</p>
                        </div>
                        <div class="col-md-3">
                            <p>本月合同到期</p>
                            <p>200</p>
                        </div>
                        <div class="col-md-3">
                            <p>本月试用转正</p>
                            <p>200</p>
                        </div>
                        <div class="col-md-3">
                            <p>本月合同待新签</p>
                            <p>200</p>
                        </div>
                        <div class="col-md-3">
                            <p>本月合同待续签</p>
                            <p>200</p>
                        </div>
                    </div>
                    <div class="col">
                        <p>系统公告
                            <span><button class="mbutton-blueb btn1" id="mybtn"><span
                    class="iconfont icon-jiahao"></span>发布公告</button>
                            </span>
                            <span><button class="mbutton-blueb">查看更多<span class="iconfont icon-youjiantou"></span></button>
                            </span>
                        </p>
                        <div>
                            <!-- <div class="col-md-8">
                <p><span></span><span></span></p>
              </div>
              <div class="col-md-4">
                <p><span class="iconfont icon-miaobiao"></span> 2019-04-10 09:00</p>
              </div> -->
                            <table class="table ytable">
                                <thead>
                                    <tr>

                                    </tr>
                                </thead>
                                <tbody>
                                    <!-- <tr>
                    <td><span>【通知公告】</span>关于xxx对学校的贡献xxxxxx</td>
                    <td><span class="iconfont icon-miaobiao"></span> 2019-04-10 09:00</td>
                  </tr>
                  <tr>
                    <td><span>【通知公告】</span>关于xxx对学校的贡献xxxxxx</td>
                    <td><span class="iconfont icon-miaobiao"></span> 2019-04-10 09:00</td>
                  </tr> -->
                                </tbody>
                            </table>
                        </div>

                    </div>

                </div>

                <div class="modal baogao" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
                    <div class="modal-dialog" role="document">
                        <div class="modal-content">
                            <div class="modal-header">
                                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                    aria-hidden="true">&times;</span></button>
                                <h4 class="modal-title">发布公告</h4>
                            </div>
                            <div class="modal-body">
                                <div class="co">
                                    <span><span>*</span>选择栏目：</span>
                                    <select name="" id="select5">
                    <option value="内部分享">内部分享</option>
                  </select>
                                </div>
                                <div class="co">
                                    <span><span>*</span>公告题目：</span>
                                    <input type="text" placeholder="不能超过20字">
                                </div>

                                <div class="co">
                                    <span><span>*</span>接收人员：</span>
                                    <label><input type="radio" style="vertical-align:middle;margin-bottom:5px" name="yuangong"
                      value="全体员工" checked='checked'>全体员工</label>
                                    <label><input type="radio" style="vertical-align:middle;margin-bottom:5px" name="yuangong"
                      value="指定员工">指定员工</label>
                                </div>
                                <div class="co">
                                    <span><span>*</span>公告详情：</span>
                                    <div><textarea name="" id="" cols="60" rows="10"></textarea></div>
                                </div>
                                <div class="co">
                                    <span><span> </span> 发布时间：</span>
                                    <label><input type="date" /></label>
                                </div>
                                <div class="co">
                                    <span><span> </span> 发布人员：</span>
                                    <label><input type="text" /></label>

                                </div>
                                <div class="co">
                                    <span><span> </span> 提醒方式：</span>
                                    <label><input type="radio" name="xiaoxi" value="系统消息" style="vertical-align:middle;margin-bottom:5px"
                      checked='checked' />系统消息</label>
                                    <label><input type="radio" name="xiaoxi" value="邮件通知"
                      style="vertical-align:middle;margin-bottom:5px" />邮件通知</label>
                                    <label><input type="radio" name="xiaoxi" value="短信通知"
                      style="vertical-align:middle;margin-bottom:5px" />短信通知</label>

                                </div>

                            </div>
                            <div class="modal-footer">
                                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                                <button type="button" class="btn btn-primary btnq" data-dismiss="modal">确定</button>
                            </div>
                        </div>
                        <!-- /.modal-content -->
                    </div>
                    <!-- /.modal-dialog -->
                </div>
                <!-- /.modal -->
            </div>
            <div class="container xx2">
                <div class="row clear">
                    <div class="col">
                        <p><span>学历分布</span>
                            <span>年龄分布</span>
                            <span>
                <select name="" id="select1">
                  <option value="0">教务处</option>
                  <option value="0">计算机工程学院</option>
                  <option value="0">xx学校</option>
                </select>
              </span>
                        </p>
                        <div id="echarts3">

                        </div>
                    </div>
                    <div class="col">
                        <p>教师介绍
                            <span>
                <select name="" id="select">
                  <option value="0">教务处</option>
                  <option value="0">计算机工程学院</option>
                  <option value="0">xx学校</option>
                </select>
              </span>
                        </p>
                        <div id="lunbo">
                            <div id="carousel-example-generic" class="carousel slide" data-ride="carousel">

                                <!-- Wrapper for slides -->
                                <div class="carousel-inner" role="listbox">
                                    <div class="item active">

                                        <img src="../../images/11.png" alt="">

                                        <div class="carousel-caption">
                                            <div class="col-md-12">
                                                <p><span>教师编号：</span>JS0001</p>
                                                <p><span>教师姓名：</span>梁朝伟</p>
                                                <p><span>所在部门：</span>教务处</p>
                                                <p><span>担任职位：</span>教务主任</p>
                                            </div>

                                        </div>
                                    </div>
                                    <div class="item">
                                        <img src="../../images/11.png" alt="">
                                        <div class="carousel-caption">
                                            <div class="col-md-12">
                                                <p><span>教师编号：</span>JS0001</p>
                                                <p><span>教师姓名：</span>梁朝伟</p>
                                                <p><span>所在部门：</span>教务处</p>
                                                <p><span>担任职位：</span>教务主任</p>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="item">
                                        <img src="../../images/11.png" alt="">
                                        <div class="carousel-caption">
                                            <div class="col-md-12">
                                                <p><span>教师编号：</span>JS0001</p>
                                                <p><span>教师姓名：</span>梁朝伟</p>
                                                <p><span>所在部门：</span>教务处</p>
                                                <p><span>担任职位：</span>教务主任</p>
                                            </div>
                                        </div>
                                    </div>

                                </div>

                            </div>
                            <!-- <div class="imgDiv">
                <div class="col-md-6">
                  <img src="../../images/11.png" alt="">
                </div>
                <div class="col-md-6">
                  <p><span>教师编号：</span>JS0001</p>
                  <p><span>教师姓名：</span>梁朝伟</p>
                  <p><span>所在部门：</span>教务处</p>
                  <p><span>担任职位：</span>教务主任</p>
                </div>

              </div>
              <div class="imgDiv">
                <div class="col-md-6">
                  <img src="../../images/11.png" alt="">
                </div>
                <div class="col-md-6">
                  <p><span>教师编号：</span>JS0001</p>
                  <p><span>教师姓名：</span>周总</p>
                  <p><span>所在部门：</span>教育处</p>
                  <p><span>担任职位：</span>语文老师</p>
                </div>

              </div>
              <div class="imgDiv">
                <div class="col-md-6">
                  <img src="../../images/11.png" alt="">
                </div>
                <div class="col-md-6">
                  <p><span>教师编号：</span>JS0001</p>
                  <p><span>教师姓名：</span>梁朝伟</p>
                  <p><span>所在部门：</span>教务处</p>
                  <p><span>担任职位：</span>教务主任</p>
                </div>

              </div> -->
                        </div>
                        <div>


                        </div>

                    </div>

                </div>
                <div class="row">

                </div>
            </div>
            <div class="container xx3">
                <div class="row clear">
                    <div class="col">
                        <p><span>学校教师人数分布</span>
                            <span>
                <select name="" id="select2">
                  <option value="0">教务处</option>
                  <option value="0">计算机工程学院</option>
                  <option value="0">xx学校</option>
                </select>
              </span>
                        </p>
                        <div id="echarts1">

                        </div>
                    </div>
                    <div class="col">
                        <p>学校教师构成分布
                            <span>
                <select name="" id="select2">
                  <option value="0">教务处</option>
                  <option value="0">计算机工程学院</option>
                  <option value="0">xx学校</option>
                </select>
              </span>
                        </p>
                        <div id="echarts2">

                        </div>
                        <div>


                        </div>

                    </div>

                </div>

            </div>
            <div class="container xx3">
                <div class="row clear">
                    <div class="col">
                        <p><span>工作报告</span>
                            <span>
                <select name="" id="select3">
                  <option value="0">教务处</option>
                  <option value="0">计算机工程学院</option>
                  <option value="0">xx学校</option>
                </select>
                <span><button class="mbutton-blueb btn2"><span class="iconfont icon-jiahao"></span>写新报告</button>
                            </span>
                            <span><a href="../xitongshouye--shikaiwen/gongzuoribao.html"><button class="mbutton-blueb">查看更多<span
                        class="iconfont icon-youjiantou"></span></button>
                            </a>
                            </span>
                            </span>
                        </p>
                        <table class="table ttable">
                            <thead>
                                <tr>

                                </tr>
                            </thead>
                            <tbody class="ttbody">

                            </tbody>
                        </table>
                    </div>
                    <div class="col">
                        <p><span>日程日历</span>
                            <span>
                <select name="" id="select3">
                  <option value="0">教务处</option>
                  <option value="0">计算机工程学院</option>
                  <option value="0">xx学校</option>
                </select>
                <span><button class="mbutton-blueb btn3"><span class="iconfont icon-jiahao"></span>新建日程</button>
                            </span>
                            <span><button class="mbutton-blueb rGuan">日程管理<span
                      class="iconfont icon-youjiantou"></span></button>
                            </span>
                            </span>
                        </p>
                        <div id="calendar">
                            <div class="aaa">
                                <button class="butt" onClick="shang()">上个月</button>
                                <div id="month"></div>
                                <button class="butt" onClick="next()" id="nav">下个月</button>
                            </div>
                            <div class="aaa">
                                <div class="evrday aaa">日</div>
                                <div class="evrday aaa">一</div>
                                <div class="evrday aaa">二</div>
                                <div class="evrday aaa">三</div>
                                <div class="evrday aaa">四</div>
                                <div class="evrday aaa">五</div>
                                <div class="evrday aaa">六</div>
                            </div>

                            <div id="day" style="color:#999" class="aaa"></div>
                        </div>

                    </div>

                </div>
            </div>

        </div>
    </div>

    <div class="modal  richeng" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
              aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title">写工作报告</h4>
                </div>
                <div class="modal-body">
                    <div class="co">
                        <span><span>*</span>报告类型：</span>
                        <select name="" id="select6">
              <option value="0">日报</option>
              <option value="1">周报</option>
              <option value="2">月报</option>
            </select>
                    </div>

                    <div class="co">
                        <span><span>*</span>工作总结：</span>
                        <div><textarea name="" id="" cols="60" rows="10" placeholder="请输入工作总结"></textarea></div>
                    </div>
                    <div class="co">
                        <span><span> </span> 文件上传：</span>
                        <button> <span class="iconfont icon--daochu"></span>选择附件</button>
                        <p>支持格式：.rar .zip .doc .docx .pdf ，单个文件不能超过20MB</p>
                    </div>
                    <div class="co">
                        <span><span> </span> 图片上传：</span>

                    </div>
                    <div class="co">
                        <span><span>*</span>批阅人员：</span>
                        <input type="text">
                    </div>
                    <div class="co">
                        <span><span></span>抄送人员：</span>
                        <input type="text">
                    </div>

                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                    <button type="button" class="btn btn-primary btnq">确定</button>
                </div>
            </div>
            <!-- /.modal-content -->
        </div>
        <!-- /.modal-dialog -->
    </div>
    <!-- /.modal -->

</body>
<script src="../../js/xitongshouye/echarts.js"></script>
<script src="../../js/nav.js"></script>
<script>
    $('.btn1').click(function() {
        $('.baogao').modal('show')
    })
    $('.btn2').click(function() {
        $('.richeng').modal('show')
    })

    // 基于准备好的dom，初始化echarts实例
    var myChart1 = echarts.init(document.getElementById('echarts3'));
    var myChart2 = echarts.init(document.getElementById('echarts1'));
    var myChart3 = echarts.init(document.getElementById('echarts2'));
    // 指定图表的配置项和数据
    var option = {
        title: {

        },
        tooltip: {
            trigger: 'item'
        },
        legend: {
            orient: 'vertical',
            right: 'right',
            top: '35%',
        },
        series: [{
            name: '',
            type: 'pie',
            radius: ['40%', '70%'],
            data: [{
                value: 6,
                name: '博士'
            }, {
                value: 14,
                name: '硕士'
            }, {
                value: 56,
                name: '本科'
            }, {
                value: 65,
                name: '专科'
            }, {
                value: 46,
                name: '高中及以下'
            }],
            emphasis: {
                itemStyle: {
                    shadowBlur: 10,
                    shadowOffsetX: 0,
                    shadowColor: 'rgba(0, 0, 0, 0.5)'
                }
            }
        }]
    };
    myChart1.setOption(option);
    //图表2
    var option1 = {
        tooltip: {
            trigger: 'axis',
            axisPointer: {
                type: 'cross',
                crossStyle: {
                    color: '#999'
                }
            }
        },
        toolbox: {
            feature: {
                dataView: {
                    show: true,
                    readOnly: false
                },
                magicType: {
                    show: true,
                    type: ['line', 'bar']
                },
                restore: {
                    show: true
                },
                saveAsImage: {
                    show: true
                }
            }
        },
        legend: {
            data: ['Evaporation', 'Precipitation', 'Temperature']
        },
        xAxis: [{
            type: 'category',
            data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
            axisPointer: {
                type: 'shadow'
            }
        }],
        yAxis: [{
            type: 'value',
            name: 'Precipitation',
            min: 0,
            max: 250,
            interval: 50,
            axisLabel: {
                formatter: '{value} ml'
            }
        }, {
            type: 'value',
            name: 'Temperature',
            min: 0,
            max: 25,
            interval: 5,
            axisLabel: {
                formatter: '{value} °C'
            }
        }],
        series: [{
            name: 'Evaporation',
            type: 'bar',
            data: [
                2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3
            ]
        }, {
            name: 'Precipitation',
            type: 'bar',
            data: [
                2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3
            ]
        }, {
            name: 'Temperature',
            type: 'line',
            yAxisIndex: 1,
            data: [2.0, 2.2, 3.3, 4.5, 6.3, 10.2, 20.3, 23.4, 23.0, 16.5, 12.0, 6.2]
        }]
    };
    myChart2.setOption(option1);
    //图表3
    var option2 = {
        title: {},
        legend: {
            data: ['Allocated Budget', 'Actual Spending']
        },
        radar: {
            // shape: 'circle',
            indicator: [{
                    name: '普通教师',
                    max: 120
                }, {
                    name: '骨干教师',
                    max: 120
                }, {
                    name: '高级管理',
                    max: 120
                }, {
                    name: '中级管理',
                    max: 120
                }, {
                    name: '管理人员',
                    max: 120
                },

            ]
        },
        series: [{
            name: 'Budget vs spending',
            type: 'radar',
            data: [{
                    value: [120, 20, 20, 30, 50],
                    name: '基层'
                },

            ]
        }]
    };
    myChart3.setOption(option2);


    //donghualunbo
    //日程
    $('.rGuan').click(function() {
        location.href = '../../pages/sider_nav/date.html'
    })
    var today = new Date(); //获取当前时间
    var year = today.getFullYear(); //获取当前的年份
    var month = today.getMonth() + 1; //获取当前月
    var day = today.getDate(); //获取当前月
    var allday = 0;

    function showmonth() {
        var year_month = year + "年" + month + "月";
        document.getElementById("month").innerHTML = year_month; //显示当前的年月日
    }

    function coun() {
        if (month != 2) {
            if (month == 4 || month == 6 || month == 9 || month == 11) //判断是否是相同天数的几个月，二月除外
                allday = 30;
            else
                allday = 31;
        } else {
            if ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0)) //判断是否是闰年，进行相应的改变
                allday = 29;
            else
                allday = 28;
        }
    }
    //显示相应月份的天数
    function showday() {
        showmonth()
        coun();
        var fistdate = new Date(year, month - 1, 1);
        var xinqi = fistdate.getDay();
        var daterow = document.getElementById("day");
        for (var i = 0; i < xinqi; i++) //循环输出天数
        {
            var dayElement = document.createElement("div");
            dayElement.className = "evrday";
            daterow.appendChild(dayElement);
        }

        for (var j = 1; j <= allday; j++) {
            var dayElement = document.createElement("div");
            dayElement.innerHTML = j;
            dayElement.className = "evrday";
            if (j == day) //当前日，标红
                dayElement.style.color = "red";
            daterow.appendChild(dayElement);
        }
    }
    //点击下个月
    function next() {
        document.getElementById('day').innerHTML = "";
        if (month < 12) {
            month = month + 1;
        } else {
            month = 1;
            year = year + 1;
        }
        document.getElementById('div').innerHTML = showday();
    }
    //点击上个月
    function shang() {
        document.getElementById('day').innerHTML = "";
        if (month > 1) {
            month = month - 1;
        } else {
            month = 12;
            year = year - 1;
        }
        document.getElementById('div').innerHTML = showday();
    }
</script>

</html>